package my.design.mediator;

/**
 * @author zp
 * @version 1.0
 * @description: 窗帘
 * @date 2022/10/27 19:09
 */

public class Curtains extends Colleague {

    public Curtains(Mediator mediator, String name) {
        super(mediator, name);
        mediator.register(name, this);
    }

    @Override
    public void sendMessage(int stateChange) {
        this.getMediator().getMessage(stateChange, this.name);
    }

    public void upCurtains() {
        System.out.println("I am holding Up Curtains!");
    }

}
